﻿/***************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    This code is licensed under the Visual Studio 
    Visualization and Modeling SDK license terms.

    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
***************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.VisualStudio.ArchitectureTools.CodeRepositoryQuery
{
    partial class Type
    {
        /// <summary>
        /// Computed field: DO NOT USE IN THE QUERIES
        /// </summary>
        public string QualifiedName
        {
            get
            {
                if (this.ContainingType != null)
                {
                    return this.ContainingType.QualifiedName + "." + this.Name;
                }
                else
                {
                    return this.Namespace.Name + "." + this.Name;
                }
            }
        }

        /// <summary>
        /// Display label
        /// </summary>
        public override string ToString()
        {
            return this.QualifiedName;
        }
    }

}
